﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT019 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;

    [Description("Input Time")]
    public MT019.Tag175 InputTime_175
    {
      get
      {
        return new MT019.Tag175((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U0002);
      }
    }

    [Description("Input Time")]
    public MT019.Tag175 Tag175_InputTime
    {
      get
      {
        return this.InputTime_175;
      }
    }

    [Description("Message Input Reference")]
    public Tag106 MessageInputReference_106
    {
      get
      {
        return new Tag106((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U0004);
      }
    }

    [Description("Message Input Reference")]
    public Tag106 Tag106_MessageInputReference
    {
      get
      {
        return this.MessageInputReference_106;
      }
    }

    [Description("Message User Reference")]
    public Tag108 MessageUserReference_108
    {
      get
      {
        return new Tag108((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U0005);
      }
    }

    [Description("Message User Reference")]
    public Tag108 Tag108_MessageUserReference
    {
      get
      {
        return this.MessageUserReference_108;
      }
    }

    [Description("Swift Address")]
    public Tag102 SwiftAddress_102
    {
      get
      {
        return new Tag102((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U0007);
      }
    }

    [Description("Swift Address")]
    public Tag102 Tag102_SwiftAddress
    {
      get
      {
        return this.SwiftAddress_102;
      }
    }

    [Description("Message Output Reference")]
    public Tag107 MessageOutputReference_107
    {
      get
      {
        return new Tag107((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U000E);
      }
    }

    [Description("Message Output Reference")]
    public Tag107 Tag107_MessageOutputReference
    {
      get
      {
        return this.MessageOutputReference_107;
      }
    }

    [Description("Reason For Abort")]
    public Tag432 AbortReason_432
    {
      get
      {
        return new Tag432((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U000F);
      }
    }

    [Description("Reason For Abort")]
    public Tag432 Tag432_AbortReason
    {
      get
      {
        return this.AbortReason_432;
      }
    }

    [Description("")]
    public Tag619 ServiceCode_619
    {
      get
      {
        return new Tag619((SwiftElement) this, 0, (SwiftDefinitionElement) MT019.U0011);
      }
    }

    [Description("")]
    public Tag619 Tag619_ServiceCode
    {
      get
      {
        return this.ServiceCode_619;
      }
    }

    public MT019()
      : base(true)
    {
    }

    public MT019(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT019.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT019.MessageDefinition = new SwiftMessageDefinition("MT019", "Abort Notification");
      MT019.U0002 = new SwiftTagDefinition("InputTime_175", "Input Time");
      MT019.U0002.TagName = "{175:";
      MT019.U0003 = new SwiftTagSubItemDefinition("InputTime", "Input Time");
      MT019.U0002.Elements.Add((SwiftDefinitionElement) MT019.U0003);
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U0002);
      MT019.U0004 = new SwiftTagDefinition("MessageInputReference_106", "Message Input Reference");
      MT019.U0004.TagName = "{106:";
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U0004);
      MT019.U0005 = new SwiftTagDefinition("MessageUserReference_108", "Message User Reference");
      MT019.U0005.TagName = "{108:";
      MT019.U0005.Mandatory = false;
      MT019.U0006 = new SwiftTagSubItemDefinition("MessageUserReference", "MessageUser Reference");
      MT019.U0005.Elements.Add((SwiftDefinitionElement) MT019.U0006);
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U0005);
      MT019.U0007 = new SwiftTagDefinition("SwiftAddress_102", "Swift Address");
      MT019.U0007.TagName = "{102:";
      MT019.U0008 = new SwiftTagSubItemDefinition("SwiftAddress", "Swift Address");
      MT019.U0007.Elements.Add((SwiftDefinitionElement) MT019.U0008);
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U0007);
      MT019.U000E = new SwiftTagDefinition("MessageOutputReference_107", "Message Output Reference");
      MT019.U000E.TagName = "{107:";
      MT019.U000E.Mandatory = false;
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U000E);
      MT019.U000F = new SwiftTagDefinition("AbortReason_432", "Reason For Abort");
      MT019.U000F.TagName = "{432:";
      MT019.U0010 = new SwiftTagSubItemDefinition("AbortReason", "Reason For Abort");
      MT019.U000F.Elements.Add((SwiftDefinitionElement) MT019.U0010);
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U000F);
      MT019.U0011 = new SwiftTagDefinition("ServiceCode_619", "");
      MT019.U0011.TagName = "{619:";
      MT019.U0011.Mandatory = false;
      MT019.U0012 = new SwiftTagSubItemDefinition("ServiceCode", "Service code");
      MT019.U0011.Elements.Add((SwiftDefinitionElement) MT019.U0012);
      MT019.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT019.U0011);
    }

    public class Tag175 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("175", value);
        }
      }

      internal Tag175(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
